<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="com.ridanlabs.professorwebsite.general.CourseSeason" %>

<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" href="/static/css/gae.css" type="text/css" />
<title>Add a new course</title>
</head>
<body>
	<div id="content">
		<p>
			Welcome to the Professor Appengine App, <b> <sec:authentication property="principal.userEmail" /></b>. 
			Please enter your registration details in order to use the application.
		</p>

		<form:form id="course" method="post" modelAttribute="courseForm">
			<fieldset>
				<form:label path="courseName"> Course name: </form:label>
				<form:errors path="courseName" cssClass="fieldError" />
				<br />
				<form:input path="courseName" />
				<br />

				<form:label path="section"> Section: </form:label>
				<form:errors path="section" cssClass="fieldError" />
				<br />
				<form:input path="section" />
				<br />

				<form:label path="season">  Quarter/Semester: </form:label>
				<form:errors path="season" cssClass="fieldError" />
				<br /> 
				<input type="radio" name="season" value="<%= CourseSeason.FALL.getCourseSeason() %>" checked="checked" /> Fall </br> 
				<input type="radio" name="season" value="<%= CourseSeason.WINTER.getCourseSeason() %>" /> Winter </br>
				<input type="radio" name="season" value="<%= CourseSeason.SPRING.getCourseSeason() %>" /> Spring </br>
				<input type="radio" name="season" value="<%= CourseSeason.SUMMER.getCourseSeason() %>" /> Summer 
				<br />
			</fieldset>
			<input style="width:9em" type="submit" value="Add Course"> &nbsp;
			
		</form:form>
	</div>
</body>
</html>